<!DOCTYPE html>
<html lang="zh-CN" data-bs-theme="light">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}园林景观设计理念与案例分享平台{% endblock %}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/all.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/custom.css') }}">
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-light bg-light shadow-sm">
        <div class="container">
            <a class="navbar-brand" href="{{ url_for('index') }}">
                <i class="fas fa-tree text-success"></i> 欢迎使用本系统
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('design.index') }}">
                            <i class="fas fa-drafting-compass"></i> 设计案例
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('community.index') }}">
                            <i class="fas fa-users"></i> 社区交流
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('learning.index') }}">
                            <i class="fas fa-graduation-cap"></i> 在线学习
                        </a>
                    </li>
                    {% if current_user.is_authenticated and current_user.role == 'admin' %}
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('admin.users') }}">用户管理</a>
                    </li>
                    {% endif %}
                </ul>
                <div class="d-flex">
                    <button class="btn btn-outline-primary me-2" type="button" onclick="toggleTheme()">
                        <i class="fas fa-moon"></i>
                    </button>
                    {% if current_user.is_authenticated %}
                        <div class="dropdown">
                            <button class="btn btn-outline-primary dropdown-toggle" type="button" id="userMenu" data-bs-toggle="dropdown">
                                <i class="fas fa-user"></i> {{ current_user.username }}
                            </button>
                            <ul class="dropdown-menu dropdown-menu-end">
                                <li><a class="dropdown-item" href="#"><i class="fas fa-user-circle"></i> 个人中心</a></li>
                                <li><a class="dropdown-item" href="#"><i class="fas fa-cog"></i> 设置</a></li>
                                <li><hr class="dropdown-divider"></li>
                                <li><a class="dropdown-item" href="{{ url_for('auth.logout') }}"><i class="fas fa-sign-out-alt"></i> 退出</a></li>
                            </ul>
                        </div>
                    {% else %}
                        <a href="{{ url_for('auth.login') }}" class="btn btn-outline-success me-2">
                            <i class="fas fa-sign-in-alt"></i> 登录
                        </a>
                        <a href="{{ url_for('auth.register') }}" class="btn btn-success">
                            <i class="fas fa-user-plus"></i> 注册
                        </a>
                    {% endif %}
                </div>
            </div>
        </div>
    </nav>

    <!-- 主要内容 -->
    <main class="container py-4">
        {% block content %}{% endblock %}
    </main>

    <!-- 页脚 -->
    <footer class="bg-light py-4 mt-5">
        <div class="container">
            <div class="row">
                <div class="col-md-4">
                    <h5>关于我们</h5>
                    <p>专业的园艺技术与插花艺术平台，致力于推广园艺技术和传播插花文化。</p>
                </div>
                <div class="col-md-4">
                    <h5>快速链接</h5>
                    <ul class="list-unstyled">
                        <li><a href="#" class="text-decoration-none">设计案例</a></li>
                        <li><a href="#" class="text-decoration-none">社区交流</a></li>
                        <li><a href="#" class="text-decoration-none">在线学习</a></li>
                    </ul>
                </div>
                <div class="col-md-4">
                    <h5>联系我们</h5>
                    <ul class="list-unstyled">
                        <li><i class="fas fa-envelope"></i> contact@example.com</li>
                        <li><i class="fas fa-phone"></i> +86 123 4567 8900</li>
                    </ul>
                </div>
            </div>
            <hr>
            <div class="text-center">
                <p class="mb-0">&copy; 园林景观设计理念与案例分享平台</p>
            </div>
        </div>
    </footer>

    <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/custom.js') }}"></script>
</body>
</html> 